//
//  KZBaseSideLineView.m
//  kangzhipifuyisheng
//
//  Created by 唐开江 on 15/5/29.
//  Copyright (c) 2015年 KangZhi. All rights reserved.
//

#import "KZBaseSideLineView.h"

@interface KZBaseSideLineView ()
@property (nonatomic,strong) UIView * upLine ;


@end

@implementation KZBaseSideLineView

 - (void)awakeFromNib
{
    [super awakeFromNib];
    
    [self setAttribute];

}
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
 
        [self setAttribute];
    }
    return self;
}
- (void)setAttribute
{
    
    self.width = screenWidth;
    UIView * upLine = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.width, KZBaseSideLineViewLineHeigth)];
    self.upLine = upLine;
    upLine.backgroundColor = [UIColor hexFloatColor:KZBaseSideLineViewLineColor];
    UIView * downLine = [[UIView alloc]initWithFrame:CGRectMake(0, self.height- KZBaseSideLineViewLineHeigth, self.width, KZBaseSideLineViewLineHeigth)];
    downLine.backgroundColor = [UIColor hexFloatColor:KZBaseSideLineViewLineColor];
    self.downLine = downLine;

    [self addSubview:upLine];
    [self addSubview:downLine];

}

-  (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.downLine.width = self.width;
    self.upLine.width = self.width;


}

@end
